class testClass:
    classvar="class variable"
    data=[0,1,2,3]
    def __init__(self,x):
        self.data="data1"
        self.instanceVar=x
    def display(self):
        print(self.classvar,self.instanceVar,self.data)
        
tetstc=testClass('instance var')
tetstc.display()

testClass.classvar="after changed!"
tetstc.display()

tetstc2=testClass('instance var2')
tetstc2.display()

tetstc.classvar="chenged by instance!"
tetstc.display()
tetstc2.display()


class subClass(testClass):
    subClassVar="subclass variable"
    def __init__(self,x):
        self.data="data2"
#        super("super inatanceVar")
        self.instanceVar="superinstance var"
        self.subInstanceVar=x
    
    def display(self):
        print(self.classvar,self.instanceVar,self.subClassVar,self.subInstanceVar)
        print("data: ",self.data)

#sub=subClass("subInstance var")
#sub.display()